Skip to content

Instantly share code, notes, and snippets.

@timvisee
timvisee / falsehoods-programming-time-list.md
Last active May 12, 2024 12:53
Falsehoods programmers believe about time, in a single list

Falsehoods programmers believe about time

This is a compiled list of falsehoods programmers tend to believe about working with time.

Don't re-invent a date time library yourself. If you think you understand everything about time, you're probably doing it wrong.

Falsehoods

  • There are always 24 hours in a day.
  • February is always 28 days long.
  • Any 24-hour period will always begin and end in the same day (or week, or month).
@Jamp
Jamp / cotizaciones.php
Created February 13, 2019 00:41 — forked from jtechera/cotizaciones.php
Cotizacion de monedas y U.I. desde el BCU (Uruguay)
<?php
function getCotizaciones($monedas = true)
{
$url = 'https://www.bcu.gub.uy/_layouts/BCU.Cotizaciones/handler/CotizacionesHandler.ashx?op=getcotizaciones';
$data = "";
$last_date_found = false;
$diff = 1;
$cotizaciones = array();
$codigosAceptados = array("USD", "EURO", "CHF", "GBP", "ARS", "BRL", "JPY", "U.I.");
//
// SignatureAnimation.swift
// OpenSwiftUIAnimations
//
// Created by Amos Gyamfi on 11.5.2024.
//
import SwiftUI
struct SignatureAnimation: View {
@TinsFox
TinsFox / utilities.css
Created May 11, 2024 02:49
simple tailwindcss utilities
.pointer-events-none { pointer-events : none }
.pointer-events-auto { pointer-events : auto }
.visible { visibility : visible }
.invisible { visibility : hidden }
.collapse { visibility : collapse }
.static { position : static }
.fixed { position : fixed }
.absolute { position : absolute }
.relative { position : relative }
.sticky { position : sticky }
@Techgokul
Techgokul / Matrixrain.html
Created December 7, 2017 12:14
Make a Matrix rain using HTML5,JS,CSS
<html>
<head>
<title>Matrix Rain</title>
<style>
* {margin: 0; padding: 0;}
body {background: black;}
canvas {display: block;}
</style>
</head>
<body>
@lucianolacurcia
lucianolacurcia / bcuapi.md
Last active May 12, 2024 12:41
BCU API - Uruguay - Obtener cotizaciones - minidocs

Cotizaciones BCU:

Para obtener las cotizaciones del Banco Central de Uruguay a través de su API se debe llamar al enpoint:

https://cotizaciones.bcu.gub.uy/wscotizaciones/servlet/awsbcucotizaciones?wsdl

Utilizando el método http POST, añadiendo en el body de la solicitud, un xml con el sigiuente formato:

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cot="Cotiza">
   <soapenv:Header />
@aaossa
aaossa / AutoPull.bat
Created March 27, 2016 04:17
Batch utilities
@ECHO OFF
REM This bat file iterates on the folders in this directory and
REM makes a "git pull" over every folder (only "git repos")
FOR /f "delims=" %%D IN ('dir /a:d-h /b') DO (
CD %%~D
IF EXIST ".git" (
ECHO Repo: %%D
git pull
@fjsj
fjsj / celery_settings.py
Last active May 12, 2024 12:37
Recommended Celery Django settings for reliability. For more details, check the DjangoCon 2023 talk "Mixing reliability with Celery for delicious async tasks" by Flávio Juvenal: https://youtu.be/VuONiF99Oqc
# Recommended Celery Django settings for reliability:
# (use `app.config_from_object('django.conf:settings', namespace='CELERY')`
# in proj/celery.py module)
from decouple import config # use python-decouple: https://github.com/HBNetwork/python-decouple
# Prefer RabbitMQ over Redis for Broker,
# mainly because RabbitMQ doesn't need visibility timeout. See:
# https://blog.daftcode.pl/working-with-asynchronous-celery-tasks-lessons-learned-32bb7495586b
# https://engineering.instawork.com/celery-eta-tasks-demystified-424b836e4e94
  • MinecraftServer::tickServer
    • ServerFunctionManager::tick
      • Run command functions
        • Trigger inventory_changed (loot, give, clear commands)
        • Trigger recipe_unlocked (recipe command)
        • Trigger effects_changed (effect command)
        • Trigger changed_dimension (teleport command)
    • ServerLevel::tick (per dimension)
      • ServerLevel::tickTime (overworld only)
  • Increment game time